<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 18-7-29
 * Time: 上午9:43
 */

namespace common\models\db;

/**
 * Class RoleMenu
 * @package common\models\db
 *
 * @property Role $role
 * @property Menu $menu
 */
class RoleMenu extends \common\models\db\tables\RoleMenu
{
    /**
     * @return \yii\db\ActiveQuery
     */
    public function getRole()
    {
        return $this->hasOne(Role::className(), ['id' => 'role_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getMenu()
    {
        return $this->hasOne(Menu::className(), ['id' => 'menu_id']);
    }
}